package com.alibaba.controller;


import com.alibaba.service.ArticleService;
import com.alibaba.utils.Result;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

/**
 *
 * @author ZhouYaDong
 * @date 2025/9/25
 * @description
 */
@RestController
@RequestMapping("/articles")
public class ArticleController {

    @Resource
    private ArticleService articleService;

    @PostMapping("view")
    public Result<String> viewArticle(@RequestParam("articleId") Long articleId) {
        articleService.viewArticle(articleId);
        return Result.success("Article viewed successfully");
    }
}
